.app {
  .main-container {
    position: relative;
    min-height: 100%;
    margin-left: var(--sideBarWidth);
    transition: margin-left 0.28s;
  }

  .sidebar-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    width: var(--sideBarWidth) !important;
    height: 100%;
    overflow: hidden;
    background-color: var(--menuBg);
    transition: width 0.28s;
    border-right: 1px solid var(--menuBorderColor);

    // reset element-ui css
    .horizontal-collapse-transition {
      transition:
        0s width ease-in-out,
        0s padding-left ease-in-out,
        0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    .svg-icon {
      margin-right: 8px;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }

    .el-menu {
      width: 100% !important;
      height: 100%;
      border: none;
      padding: 0 10px;
    }

    .el-menu-item {
      line-height: var(--menuHeight);
      height: var(--menuHeight);
      border-radius: 5px;
      font-weight: 700;
      font-size: 14px;
    }
    .el-sub-menu__title {
      line-height: var(--menuHeight) !important;
      height: var(--menuHeight) !important;
      border-radius: 5px;
    }
  }

  .hideSidebar {
    .mix-wrapper__left {
      width: 54px;
    }

    .sidebar-container {
      width: 54px !important;

      .header {
        .logo-wrap {
          width: 54px !important;
          transition: transform 0.28s;
        }
      }
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      position: relative;
      padding: 0 !important;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }
      }

      // TODO
      & > .svg-icon {
        margin-left: 7px;
      }

      & > span {
        display: inline-block;
        width: 0;
        height: 0;
        overflow: hidden;
        visibility: hidden;
      }
    }

    .el-sub-menu {
      overflow: hidden;

      & > .el-sub-menu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 7px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }

        .el-sub-menu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-sub-menu {
        & > .el-sub-menu__title {
          & > span {
            display: inline-block;
            width: 0;
            height: 0;
            overflow: hidden;
            visibility: hidden;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-sub-menu {
    min-width: var(--sideBarWidth) !important;
  }

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}
$colors: (1:#4080ff,2:#ffa800, 3:#f64e60, 4:#8950fc, 5:#1bc5bd, 6:#d0764f, 7:#bbdc00, 8:#0bb783, 9:#f65860, 10:#8430fc);
@each $index, $color in $colors {
  .left-menu {
    & > div {
      &:nth-child(#{$index}) {
        .svg-icon {
          color: $color;
        }
      }
    }
  }
}
.el-menu {
  div {
    margin: 2px 0;
  }
}

.menu-0 {
  & > div{
      .el-menu-item {
      font-size: 16px !important;
      font-weight: 700 !important;
      padding-left: 10px !important;
      &:hover {
        background-color: var(--menuHover) !important;
      }
      &.is-active {
        background-color: var(--menuHover);
      }
    }
  }
  .el-sub-menu {
    .el-sub-menu__title {
      font-size: 16px;
      font-weight: 700;
      border-radius: 5px;
      color: var(--text-333-color);
      padding-left: 10px !important;
      &:hover {
        background-color: var(--menuHover);
      }
    }
    .el-menu {
      padding: 5px 0 !important;
      position: relative;
    }
    &.is-active {
      & > .el-sub-menu__title {
        background-color: var(--menuHover);
        border-radius: 5px;
      }
    }
  }
  .menu-1 {
    & > div {
      .el-menu-item {
        padding-left: 40px !important;
        position: relative;
        font-size: 14px !important;
        height: 40px;
        line-height: 40px;
        color: var(--text-555-color);
        &::before {
          content: "";
          width: 6px;
          height: 6px;
          border-radius: 50%;
          margin-right: 12px;
          position: absolute;
          left: 15px;
          top: 15px;
          z-index: 9;
          border: 3px solid var(--mainColor);
        }
        &.is-active{
          color: #ffffff;
          background-color: var(--mainColor) !important;
          &::before {
            border-color: #ffffff;
          }
        }
      }
    }
    .el-sub-menu {
      .el-sub-menu__title {
        padding-left: 40px !important;
        position: relative;
        font-size: 14px;
        height: 40px !important;
        line-height: 40px;
        color: var(--text-555-color);
        &::before {
          content: "";
          width: 6px;
          height: 6px;
          border-radius: 50%;
          margin-right: 12px;
          position: absolute;
          left: 15px;
          top: 15px;
          z-index: 9;
          border: 3px solid var(--mainColor);
        }
      }
      .el-menu {
        &::after {
          content: "";
          width: 1px;
          height: 80%;
          position: absolute;
          top: 50%;
          left: 20px;
          transform: translateY(-50%);
          background-color: var(--menu-line-color);
        }
        .menu-2 {
          .el-menu-item {
            font-size: 14px !important;
            height: 34px;
            padding-left: 53px !important;
            color: var(--text-666-color);
            font-weight: 400 !important;
            &.is-active {
              color: var(--mainColor) !important;
              background-color: var(--container-bg-color) !important;
            }
            &:hover {
              background-color: var(--container-bg-color) !important;
              color: var(--mainColor) !important;
            }
          }
        }
      }
      &.is-active {
        .el-sub-menu__title {
          background-color: var(--menuHover);
          border-radius: 5px;
        }
      }
    }
  }
}
.menu-theme-dark {
  background-color: #2b2e3b !important;
  .logo-wrap {
    .logo-title {
      color: #ffffff !important;
    }
    &::after {
      background-color: #303444 !important;
    }
  }
  .left-menu {
    background-color: #2b2e3b !important;
    .menu-0 {
      .el-menu-item {
        color: #ffffff;
        &:hover {
          background-color: #303444 !important;
        }
      }
      .el-sub-menu {
        & > .el-sub-menu__title {
          color: #ffffff;
          &:hover {
            background-color: #303444 !important;
          }
        }
        &.is-active {
          & > .el-sub-menu__title {
            background-color: #303444 !important;
          }
        }
        & > .el-menu {
          background: none !important;
        }
      }
      .menu-1 {
        .el-sub-menu {
          .el-menu {
            &::after {
              content: "";
              background-color: #22252f !important;
            }
          }
          .el-sub-menu__title {
            background-color: none !important;
          }
        }
        .menu-2 {
          .el-menu-item {
            &.is-active {
              color: #ffffff !important;
              background-color: #2b2e3b !important;
            }
            &:hover {
              color: var(--mainColor) !important;
              background-color: #2b2e3b !important;
            }
          }
        }
      }
    }
  }
}
.menu-horizontal {
  .menu-0 {
    margin: 0 2px;
    .el-menu-item {
      &:not(.is-disabled) {
        &:hover {
          background-color: var(--menuHover);
        }
      }
    }
  }
}
.el-menu--vertical{
  .el-menu--popup{
    padding:0;
    border-radius: 5px;
  }
  .menu-1{
    .el-menu-item{
      height:40px;
        line-height:40px;
        font-size: 14px;
        padding-left: 14px;
        &:hover{
          color:var(--mainColor);
          background-color: var(--menuHover);
        }
    }
    .el-sub-menu{
      .el-sub-menu__title {
        height:40px;
        line-height:40px;
        font-size: 14px;
        padding-left: 14px;
        &:hover{
          color:var(--mainColor);
          background-color: var(--menuHover);
        }
      }
    }
  }
  .menu-2{
    .el-menu-item{
      height: 40px;
      line-height: 40px;
      font-size: 12px;
      padding-left: 14px;
      &:hover{
          color:var(--mainColor);
          background-color: var(--menuHover);
        }
    }
  }
}
.el-menu--horizontal {
  .el-menu--popup{
    padding:0;
    border-radius: 5px;
  }
  .menu-1 {
    .el-menu-item {
      font-size: 14px;
      padding-left: 14px !important;

      &:not(.is-disabled) {
        &:hover {
          background-color: var(--menuHover) !important;
          color: var(--text-333-color);
        }
      }
    }
    .el-sub-menu {
      .el-sub-menu__title {
        font-size: 14px;
        padding-left: 14px !important;
        &:hover {
          background-color: var(--menuHover) !important;
          color: var(--text-333-color);
        }
      }
    }
  }
  .menu-2 {
    .el-menu-item {
      font-size: 14px;
      padding-left: 14px !important;
      &:not(.is-disabled) {
        &:hover {
          background-color: var(--menuHover) !important;
          color: var(--text-333-color);
        }
      }
    }
    .el-sub-menu {
      .el-sub-menu__title {
        padding-left: 14px !important;
        &:hover {
          background-color: var(--menuHover) !important;
          color: var(--text-333-color);
        }
      }
    }
  }
}
